<?php

/**
* @Author:  	Daniel Dinh
* @Email:   	webdevelopmentvn@gmail.com
* @Link: 		http://joomsoft.net
* @Version: 	1.0
* @copyright:	Joomsoft.net
* @license:		GNU Lesser GPL
*/

// no direct access
defined('_JEXEC') or die;


?>
<div class="fe_form">
	<div class="weekly_title">
		<?php echo JText::_("COM_FARMACITY_WEEKLY_TITLE");?>
	</div>
	<div class="weekly_introtext">
		<?php echo JText::_("COM_FARMACITY_WEEKLY_INTROTEXT");?>
	</div>
	<form action="<?php echo JRoute::_('index.php?option=com_farmacity&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="client-form">
	<div class="weekly_content">
	<?php if($_SESSION['types']==1):?>
		<table width="400" class="table_timeslot" align="center">
			<tr>
				<td></td>
				<td width="70" align="center" class="slothead"><?php echo JText::_("COM_FARMACITY_TIMESLOT_FROM");?></td>
				<td width="70" align="center" class="slothead"><?php echo JText::_("COM_FARMACITY_TIMESLOT_TO");?></td>
			</tr>
			<?php for($i=0;$i<7;$i++):?>
			<tr>
				<td class="dayofweek"><?php echo JText::_("COM_FARMACITY_TIMESLOT_DAY".$i);?></td>
				<td><input type="text" class="input-time" name="from_<?php echo $i;?>[]" maxlength="5"  value="09:00"/></td>
				<td><input type="text" class="input-time" name="to_<?php echo $i;?>[]" maxlength="5"  value="18:00"/></td>
			</tr>
			<?php endfor;?>
			<tr>
				<td align="right" colspan="3">
					<input type="submit" class="fe_button" onclick="return periodSubmit();" value="Confirm">
				</td>
			</tr>
		</table>
	<?php endif;?>
	
	<?php if($_SESSION['types']==2):?>
		<table width="500" class="table_timeslot" align="center">
			<tr>
				<td></td>
				<td width="70" align="center" class="slothead"><?php echo JText::_("COM_FARMACITY_TIMESLOT_FROM");?></td>
				<td width="70" align="center" class="slothead"><?php echo JText::_("COM_FARMACITY_TIMESLOT_TO");?></td>
				<td width="70" align="center" class="slothead"><?php echo JText::_("COM_FARMACITY_TIMESLOT_FROM");?></td>
				<td width="70" align="center" class="slothead"><?php echo JText::_("COM_FARMACITY_TIMESLOT_TO");?></td>
			</tr>
			<?php for($i=0;$i<7;$i++):?>
			<tr>
				<td class="dayofweek"><?php echo JText::_("COM_FARMACITY_TIMESLOT_DAY".$i);?></td>
				<td><input type="text" class="input-time" name="from1_<?php echo $i;?>[]" maxlength="5"  value="--:--"/></td>
				<td><input type="text" class="input-time" name="to1_<?php echo $i;?>[]" maxlength="5"  value="--:--"/></td>
				<td><input type="text" class="input-time" name="from2_<?php echo $i;?>[]" maxlength="5"  value="--:--"/></td>
				<td><input type="text" class="input-time" name="to2_<?php echo $i;?>[]" maxlength="5"  value="--:--"/></td>
			</tr>
			<?php endfor;?>
			<tr>
				<td align="right" colspan="5">
					<input type="submit" class="fe_button" onclick="return periodSubmit();" value="Confirm">
				</td>
			</tr>
			
		</table>
	<?php endif;?>
	</div>
	<input type="hidden" name="task" value="weektime.save" />
	<?php echo JHtml::_('form.token'); ?>
</form>
</div>